package com.jintu.portal.pojo.submit;

import lombok.Data;
import org.apache.commons.lang3.StringUtils;

/**
 * @author very
 */
@Data
public class CodeAndUser {

    private String code;
    private String username;

    public boolean isCodeNull(){
        return StringUtils.isBlank(code);
    }

    public static CodeAndUser build(String code, String username){
        if(StringUtils.isBlank(code) || StringUtils.isBlank(username)){
            return null;
        }
        CodeAndUser codeAndUser = new CodeAndUser();
        codeAndUser.setCode(code);
        codeAndUser.setUsername(username);
        return codeAndUser;
    }
}
